<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Libusb++: LibUSB::LibUSB Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Libusb++
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">A C++ libusb wrapper</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_lib_u_s_b_1_1_lib_u_s_b.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_lib_u_s_b_1_1_lib_u_s_b-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">LibUSB::LibUSB Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Contains static methods for enumerating devices.  
 <a href="class_lib_u_s_b_1_1_lib_u_s_b.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="libusbpp_8h_source.html">libusbpp.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a532d474d390477dffd2109e8540be558"><td class="memItemLeft" align="right" valign="top">typedef std::shared_ptr&lt; <a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a> &gt;(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a532d474d390477dffd2109e8540be558">DeviceFactory_t</a> )(std::shared_ptr&lt; DeviceImpl &gt;)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a1e96edfe8903783e33d572ff43ee8238"><td class="memItemLeft" align="right" valign="top">static std::list<br class="typebreak"/>
&lt; std::shared_ptr&lt; <a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a1e96edfe8903783e33d572ff43ee8238">FindDevice</a> (uint16_t vendorID, uint16_t productID, <a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a532d474d390477dffd2109e8540be558">DeviceFactory_t</a> factory=nullptr)</td></tr>
<tr class="memdesc:a1e96edfe8903783e33d572ff43ee8238"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of devices (that can be opened) that match the given vendor/product id.  <a href="#a1e96edfe8903783e33d572ff43ee8238"></a><br/></td></tr>
<tr class="memitem:aaf1f6d3a7df3a9fefd8b12ba25a7c3be"><td class="memItemLeft" align="right" valign="top">static std::list<br class="typebreak"/>
&lt; std::shared_ptr&lt; <a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#aaf1f6d3a7df3a9fefd8b12ba25a7c3be">FindDevice</a> (uint16_t vendorID, uint16_t productID, std::wstring serialStr, <a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a532d474d390477dffd2109e8540be558">DeviceFactory_t</a> factory=nullptr)</td></tr>
<tr class="memdesc:aaf1f6d3a7df3a9fefd8b12ba25a7c3be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of devices (that can be opened) that match the given vendor/product id.  <a href="#aaf1f6d3a7df3a9fefd8b12ba25a7c3be"></a><br/></td></tr>
<tr class="memitem:acce20c7a3bd52fffe9df3ce23021858d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acce20c7a3bd52fffe9df3ce23021858d"></a>
static std::list<br class="typebreak"/>
&lt; std::shared_ptr&lt; <a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#acce20c7a3bd52fffe9df3ce23021858d">FindAllDevices</a> (<a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a532d474d390477dffd2109e8540be558">DeviceFactory_t</a> factory=nullptr)</td></tr>
<tr class="memdesc:acce20c7a3bd52fffe9df3ce23021858d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns all devices attached to the system. <br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aed9f2bd8ff81bd3986d935f9aa242d1b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed9f2bd8ff81bd3986d935f9aa242d1b"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TransferImpl</b></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Contains static methods for enumerating devices. </p>
</div><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a532d474d390477dffd2109e8540be558"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::shared_ptr&lt;<a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a>&gt;(* LibUSB::LibUSB::DeviceFactory_t)(std::shared_ptr&lt; DeviceImpl &gt;)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function pointer to a <a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html" title="Contains static methods for enumerating devices.">LibUSB</a> device object factory. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Replace with std::function? </dd></dl>

</div>
</div>
<h2>Member Function Documentation</h2>
<a class="anchor" id="a1e96edfe8903783e33d572ff43ee8238"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::list&lt;std::shared_ptr&lt;<a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a>&gt; &gt; LibUSB::LibUSB::FindDevice </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>vendorID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>productID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a532d474d390477dffd2109e8540be558">DeviceFactory_t</a>&#160;</td>
          <td class="paramname"><em>factory</em> = <code>nullptr</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a list of devices (that can be opened) that match the given vendor/product id. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vendorID</td><td>(uint16_t): USB-IF vendor id of the desired device. </td></tr>
    <tr><td class="paramname">deviceID</td><td>(uint16_t): USB-IF product id of the desired device. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>(std::list&lt;std::shared_ptr&lt;D&gt;&gt;): List of shared pointers to <a class="el" href="class_lib_u_s_b_1_1_device.html" title="Libusb device interface.">LibUSB::Device</a> class objects. </dd></dl>
<dl class="section see"><dt>See Also</dt><dd></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Multiple devices can be returned via this method, if attached. </dd></dl>

</div>
</div>
<a class="anchor" id="aaf1f6d3a7df3a9fefd8b12ba25a7c3be"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::list&lt;std::shared_ptr&lt;<a class="el" href="class_lib_u_s_b_1_1_device.html">Device</a>&gt; &gt; LibUSB::LibUSB::FindDevice </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>vendorID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>productID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::wstring&#160;</td>
          <td class="paramname"><em>serialStr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html#a532d474d390477dffd2109e8540be558">DeviceFactory_t</a>&#160;</td>
          <td class="paramname"><em>factory</em> = <code>nullptr</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a list of devices (that can be opened) that match the given vendor/product id. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vendorID</td><td>(uint16_t): USB-IF vendor id of the desired device. </td></tr>
    <tr><td class="paramname">deviceID</td><td>(uint16_t): USB-IF product id of the desired device. </td></tr>
    <tr><td class="paramname">serialStr</td><td>(std::wstring): <a class="el" href="class_lib_u_s_b_1_1_device.html" title="Libusb device interface.">Device</a> unique serial number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>(std::list&lt;std::shared_ptr&lt;D&gt;&gt;): List of shared pointers to <a class="el" href="class_lib_u_s_b_1_1_device.html" title="Libusb device interface.">LibUSB::Device</a> class objects. </dd></dl>
<dl class="section see"><dt>See Also</dt><dd></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Multiple devices can be returned via this method, if attached. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>headers/<a class="el" href="libusbpp_8h_source.html">libusbpp.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>LibUSB</b></li><li class="navelem"><a class="el" href="class_lib_u_s_b_1_1_lib_u_s_b.html">LibUSB</a></li>
    <li class="footer">Generated on Sat Sep 8 2012 17:02:56 for Libusb++ by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.2 </li>
  </ul>
</div>
</body>
</html>
